#ifndef __VIRTUAL_SERVICE_H__
#define __VIRTUAL_SERVICE_H__

#include "../base.h"

BOOL IsVirtualServiceA(LPCSTR lpServiceName);
BOOL IsVirtualServiceW(LPCWSTR lpServiceName);
void FreeVirtualServiceHandle(HANDLE vscHandle);


SC_HANDLE WINAPI Virtual_OpenService(
    _In_            SC_HANDLE               hSCManager,
    _In_            PCUNICODE_STRING                lpServiceName,
    _In_            DWORD                   dwDesiredAccess);

SC_HANDLE WINAPI Virtual_CreateService(
    _In_        SC_HANDLE    hSCManager,
    _In_        PCUNICODE_STRING     lpServiceName,
    _In_opt_    LPCWSTR     lpDisplayName,
    _In_        DWORD        dwDesiredAccess,
    _In_        DWORD        dwServiceType,
    _In_        DWORD        dwStartType,
    _In_        DWORD        dwErrorControl,
    _In_opt_    LPCWSTR     lpBinaryPathName,
    _In_opt_    LPCWSTR     lpLoadOrderGroup,
    _Out_opt_   LPDWORD      lpdwTagId,
    _In_opt_    LPCWSTR     lpDependencies,
    _In_opt_    LPCWSTR     lpServiceStartName,
    _In_opt_    LPCWSTR     lpPassword);

BOOL WINAPI Virtual_StartService(
    BOOL bUnicode,
    _In_            SC_HANDLE            hService,
    _In_            DWORD                dwNumServiceArgs,
    _In_reads_opt_(dwNumServiceArgs)
    LPCWSTR* lpServiceArgVectors);

//BOOL WINAPI Virtual_ChangeServiceConfig(
//    _In_        SC_HANDLE    hService,
//    _In_        DWORD        dwServiceType,
//    _In_        DWORD        dwStartType,
//    _In_        DWORD        dwErrorControl,
//    _In_opt_    LPCWSTR     lpBinaryPathName,
//    _In_opt_    LPCWSTR     lpLoadOrderGroup,
//    _Out_opt_   LPDWORD      lpdwTagId,
//    _In_opt_    LPCWSTR     lpDependencies,
//    _In_opt_    LPCWSTR     lpServiceStartName,
//    _In_opt_    LPCWSTR     lpPassword,
//    _In_opt_    LPCWSTR     lpDisplayName);

BOOL WINAPI Virtual_DeleteService(_In_        SC_HANDLE   hService);

#endif
